

public class backup {

}

////throw new NotYetImplementedException();
//Move playerMove = new MoveImpl( getPlayer() );
//
//System.out.println( "player "+playerMove +" -> " + getCellType(player) );		
//Move playerPlus = playerMove.doNewMove(direction);
//Move playerPlusPlus = playerPlus.doNewMove(direction);
//
////System.out.println( "player "+playerMove +" -> " + getCellType(player) );
////System.out.println( "playerPlus "+playerPlus );
////System.out.println( "playerPlusPlus "+playerPlusPlus );
//
////player = playerPlus;
//
//if ( !existsCellAt(playerPlus) )
//{
//	throw new IllegalArgumentException("Existerar inte koordinat vid playerPlus");			
//}
//
//if ( getCellType(playerPlus) == CellType.Wall )
//{
//	throw new IllegalArgumentException("Vaegg vid playerPlus");
//}		
////else if ( getCellType(playerPlus) != CellType.Box )
////{
//	if (    ( getCellType(playerPlus) == CellType.Box ) || 
//			( getCellType(playerPlus) == CellType.BoxOnGoal ) )
//	{
//		throw new NotYetImplementedException();
////		if ( !existsCellAt(playerPlusPlus) )
////		{
////			throw new IllegalArgumentException("Existerar inte koordinat vid playerPlusPlus");
////		}
////		
////		boolean found = false;
////		
////		System.out.println( "playerPlus = "+playerPlus.toString() );
////		
////		for ( Cord box : boxes )
////		{
////			System.out.println( "box = "+box.toString() );
////			if ( box.equalsMove( playerPlus ) )
////			{
////				box.update( playerPlus.getX() , playerPlus.getY() );
////				found = true;
////			}
////		}
////		
////		if ( !found )
////		{
////			throw new RuntimeException("Olle hittar inte boxen att uppdatera!");
////		}
////		 
////		CellType typePlusPlus = getCellType(playerPlusPlus);
////          switch ( typePlusPlus ) 
////          {
////  	        case EmptyFloor: 
////  	        	
////  	        	setCellType(playerPlusPlus, CellType.Box); 
////  	        	break;
////  	        	
////  	        case GoalSquare: 
////  	        	setCellType(playerPlusPlus, CellType.BoxOnGoal);
////  	        	break;
////  	        	
////  	        case Wall: 
////  	        	throw new IllegalArgumentException("Wall on playerPlusPlus");
////  	        
////  	        default: throw new IllegalArgumentException();
////          }
//	}
//	
//	CellType typePlus = getCellType(playerPlus);
//	  System.out.println("ifsatZ: "+typePlus);
//      switch ( typePlus ) 
//      {
//	        case EmptyFloor: 
//	        case Box: 
//	        	
//	        	setCellType(playerPlus, CellType.Player); 
//	        	break;
//	        	
//	        case GoalSquare: 
//	        case BoxOnGoal: 
//	        	setCellType(playerPlus, CellType.PlayerOnGoalSquare);
//	        	break;
//	        	
//	        default: throw new IllegalArgumentException( ""+getCellType(playerPlus) );
//      }
//	
////}
////else // Move box
////{
//
////}
//
///*
// * Reset original cell
// */
//CellType type = getCellType(player);
//System.out.println("loooool: "+type);
//switch ( type ) 
//{
//    case Player: 
//    	
//    	setCellType(player, CellType.EmptyFloor); 
//    	break;
//    	
//    case PlayerOnGoalSquare: 
//    	setCellType(player, CellType.GoalSquare);
//    	break;
//    
//    default: throw new IllegalArgumentException();
//}
//
//player = playerPlus;
//
//if ( !( ( getCellType( player ) == CellType.Player ) || 
//		( getCellType( player ) == CellType.PlayerOnGoalSquare ) ) )
//{
//	throw new RuntimeException("player aer inte player!");
//}
//
//return true;
//
//
////Cord inFrontOfPlayer = new CordImpl(  )
////
//////Cord newPlayerCord = (Cord) getAdjacentMoveInDirection(currentPlayerCord, direction);
////Cord newPlayerCord = (Cord) currentPlayerCord.doNewMove(direction);
////
/////*
//// * Todo transformera braedet raett.
//// */
////
////CellType cellAtNewCord = getCellType(newPlayerCord);
////
////if ( cellAtNewCord == CellType.Wall )
////{
////	return false;
////}
////else if ( cellAtNewCord == CellType.EmptyFloor )
////{
////	player = newPlayerCord;
////	
////	setCellType( currentPlayerCord, CellType.EmptyFloor );
////	setCellType( newPlayerCord, CellType.Player );
////	
////}
////else if ( cellAtNewCord == CellType.GoalSquare )
////{
////	player = newPlayerCord;
////	
////	setCellType( currentPlayerCord, CellType.EmptyFloor );
////	setCellType( newPlayerCord, CellType.PlayerOnGoalSquare );
////	
////}
////else if ( cellAtNewCord == CellType.Box )
////{
//////	Cord boxNewMove = (Cord) getAdjacentMoveInDirection(newPlayerCord, direction);
////	Cord boxNewMove = (Cord) newPlayerCord.doNewMove(direction);
////	
////	if (	( getCellType(boxNewMove) == CellType.Wall ) ||
////			( getCellType(boxNewMove) == CellType.Box ))
////	{
////		return throw new IllegalArgumentException("");
////	}
////	else if ( getCellType(boxNewMove) == CellType.EmptyFloor )
////	{
////		setCellType( boxNewMove, CellType.Box );
////	}
////	else if ( getCellType(boxNewMove) == CellType.GoalSquare )
////	{
////		setCellType( boxNewMove, CellType.BoxOnGoal );
////	}
////	else
////	{
////		throw new RuntimeException("Bugg i Olles kod: 17");
////	}
////	
////	player = newPlayerCord;
////	
////	setCellType( currentPlayerCord, CellType.EmptyFloor );
////	setCellType( newPlayerCord, CellType.Player );
////	
////}
////else
////{
////	throw new RuntimeException("Bugg i Olles kod: 4711");
////}
////
////return true;

